package com.sghd.charge.module.model;

/**
 * @author Allen
 * @date 2019/02/27
 */
public class ChargeDto {
    /**
     * 玩家Id
     */
    private Long playerId;
    /**
     * 订单号
     */
    private Long orderId;
    /**
     * 商品Id
     */
    private String goodsId;
    /**
     * 购买IP
     */
    private String ip;
    /**
     * 支付渠道{@link ChannelType#ordinal}
     * */
    private Integer channelId;

    public static ChargeDto valueOf(long playerId, long orderId, String goodsId, String ip, ChannelType channelType) {
        ChargeDto chargeDto = new ChargeDto();
        chargeDto.playerId = playerId;
        chargeDto.orderId = orderId;
        chargeDto.goodsId = goodsId;
        chargeDto.ip = ip;
        chargeDto.channelId = channelType.ordinal();
        return chargeDto;
    }

    public Long getPlayerId() {
        return playerId;
    }

    public void setPlayerId(Long playerId) {
        this.playerId = playerId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Integer getChannelId() {
        return channelId;
    }

    public void setChannelId(Integer channelId) {
        this.channelId = channelId;
    }
}
